<template>
  <el-dialog
    :close-on-click-modal=isfetch
    modal-append-to-body
    :close-on-press-escape=isfetch
    :show-close=isfetch
    lock-scroll top="10%"
    class= "dislog-login dislog-browser" :title="$t('public.tip')" :visible.sync="browser">
    <p class="browser_tip">{{$t('login.browserTip1')}}</p>
    <a target="_blank" href="//www.google.cn/intl/zh-CN/chrome/" class="ico icoChrome" :title="$t('login.browserTitle')"></a>
    <div slot="footer" class="dialog-footer">
      <a target="_blank" href="//www.google.cn/intl/zh-CN/chrome/"><el-button type="primary" >{{$t('login.browserTip4')}}</el-button></a>
      <el-button v-if="isfetch" @click.native="browser = false">{{$t('login.browserTip5')}}</el-button>
    </div>
  </el-dialog>
</template>
<script>
  export default {
    name: 'Browser',
    data () {
      return {
        browser: !(/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor)),
        isfetch: !!window.fetch || false
      }
    }
  }
</script>
<style lang="stylus" scoped>
</style>
